package com.lilicould.dao;

import com.lilicould.entity.Courses;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

public interface CourseDao {
    @Select("select * from courses")
    Courses[] getAllCourses();

    @Insert("insert into courses values(null, #{courseCode}, #{courseName}, #{credit}, #{collegeCode})")
    int addCourse(Courses course);

    @Delete("delete from courses where course_id = #{courseId}")
    int deleteCourse(String courseId);
}
